﻿Imports System
Imports System.CodeDom
Imports System.Collections.Generic
Imports System.Reflection

Namespace System.Workflow.Activities.Rules
    <AttributeUsage((AttributeTargets.Property Or AttributeTargets.Method), AllowMultiple:=True)> _
    Public NotInheritable Class RuleReadAttribute
        Inherits RuleReadWriteAttribute
        ' Methods
        Public Sub New(ByVal path As String)
            MyBase.New(path, RuleAttributeTarget.This)
        End Sub

        Public Sub New(ByVal path As String, ByVal target As RuleAttributeTarget)
            MyBase.New(path, target)
        End Sub

        Friend Overrides Sub Analyze(ByVal analysis As RuleAnalysis, ByVal member As MemberInfo, ByVal targetExpression As CodeExpression, ByVal targetQualifier As RulePathQualifier, ByVal argumentExpressions As CodeExpressionCollection, ByVal parameters As ParameterInfo(), ByVal attributedExpressions As List([Of] CodeExpression))
            If Not analysis.ForWrites Then
                MyBase.AnalyzeReadWrite(analysis, targetExpression, targetQualifier, argumentExpressions, parameters, attributedExpressions)
            End If
        End Sub

    End Class
End Namespace

